home *** CD-ROM | disk | FTP | other *** search
Wrap
;----------------------------------------------------------------------------- ; TITLE : Install ; VERSION : 1.0 ; DATE : 24.02.2000 ; DESCRIPTION : Installer script for Robotics Developer Pack. ; INPUT : - ; OUTPUT : - ;----------------------------------------------------------------------------- ; MODIFICATIONS: - ;----------------------------------------------------------------------------- ; LIMITATIONS AND BUGS ; <päiväys> ; <kuvaus> ;----------------------------------------------------------------------------- ; $VER: Install 1.0 (24.02.2000) ;----------------------------------------------------------------------------- ; VARIABLES VARIABLES VARIABLES VARIABLES VARIABLES VARIABLES VARIABLES VARIA ;----------------------------------------------------------------------------- (set #installer_ver 44) ; Minimum Installer version (set #installer_rev #?) ; Minimum Installer revision (set #application "Robotics Developer Pack") ; Application (set #packagedir "Work:") ; Default directory for software package ;----------------------------------------------------------------------------- ; Default language (English) ;----------------------------------------------------------------------------- (set #string1 ("\nInstaller version %ld.%ld required.\nPlease check your configuration." #installer_ver #installer_rev)) (set #string2 ("\n%s\n\nCopyright © 2000 Janne Peräaho.\All Rights Reserved." #application)) (set #string3 ("\n%s has now been installed." #application)) ;----------------------------------------------------------------------------- ; Strings: Installation options ;----------------------------------------------------------------------------- (set #string5 "\nSelect components to be installed:") (set #string50 "INSTALLATION OPTIONS\n\nRobotics Developer Pack is divided into 7 parts. You may choose the parts you like to install.") (set #string51 "Library ( 7 kB)") (set #string52 "Example programs (151 kB)") (set #string53 "C/C++ include files ( 25 kB)") (set #string54 "User documents ( 12 kB)") (set #string55 "Developer documents ( 52 kB)") (set #string56 "Library's history ( 3 kB)") (set #string57 "Mini SSC II documentation (563 kB)") ;----------------------------------------------------------------------------- ; Strings: Library installation ;----------------------------------------------------------------------------- (set #string6 "LIBRARY INSTALLATION\nSelect directory for minissc library.") (set #string61 "LIBRARY INSTALLATION\n\nThis part will install the minissc.library in the selected target directory.") (set #string62 "LIBS:") (set #string7 "\nCopying minissc.library...") (set #string71 "") (set #string72 "Libs") (set #string73 "minissc.library") ;----------------------------------------------------------------------------- ; Strings: Example programs installation ;----------------------------------------------------------------------------- ; Copy examples drawer (set #string8 "EXAMPLE PROGRAMS INSTALLATION\nSelect directory for RoboticsDP package. Directory 'RoboticsDP' will be created if it does not exists.") (set #string81 "EXAMPLE PROGRAMS INSTALLATION\n\nThis part will install the minissc demonstration programs. The 'RoboticDP' directory will be created in the selected target directory and example programs will be copied inside the directory.") (set #string82 "") (set #string9 "\nCopying example programs...") (set #string91 "") (set #string92 "") (set #string93 "Examples#?") ; Copy RoboticsDP drawer icon (set #string94 "\nCopying RoboticsDP icon...") (set #string95 "/") (set #string96 "RoboticsDP.info") ;----------------------------------------------------------------------------- ; Strings: C/C++ include files installation ;----------------------------------------------------------------------------- (set #stringA "C/C++ INCLUDE FILES INSTALLATION\nSelect include directory for minissc include files.") (set #stringA1 "C/C++ INCLUDE FILES INSTALLATION\n\nThis part will install C/C++ include files. Select your C/C++ compiler's 'Include' directory as a target directory.") (set #stringA2 "StormC:Include") (set #stringB "\nCopying include files...") (set #stringB1 "") (set #stringB2 "Include") (set #stringB3 "#?") ;----------------------------------------------------------------------------- ; Strings: User documentation installation ;----------------------------------------------------------------------------- (set #stringC "USER DOCUMENTATION INSTALLATION\nSelect directory for RoboticsDP package. Directory 'RoboticsDP' will be created if it does not exists.") (set #stringC1 "USER DOCUMENTATION INSTALLATION\n\nThis part will install the minissc user documentation. The 'RoboticDP' directory will be created in the selected target directory and documentation will be copied inside the directory.") (set #stringC2 "") (set #stringD "\nCopying user documentation...") (set #stringD1 "") (set #stringD2 "Docs") (set #stringD3 "RoboticsDP.guide#?") ; Copy RoboticsDP drawer icon (set #stringD4 "\nCopying RoboticsDP icon...") (set #stringD5 "/") (set #stringD6 "RoboticsDP.info") ; Copy Docs drawer icon (set #stringD7 "\nCopying Docs icon...") (set #stringD8 "") (set #stringD9 "Docs.info") ;----------------------------------------------------------------------------- ; Strings: Developer documentation installation ;----------------------------------------------------------------------------- (set #stringE "DEVELOPER DOCUMENTATION INSTALLATION\nSelect directory for RoboticsDP package. Directory 'RoboticsDP' will be created if it does not exists.") (set #stringE1 "DEVELOPER DOCUMENTATION INSTALLATION\n\nThis part will install the minissc developer documentation. The 'RoboticDP' directory will be created in the selected target directory and documentation will be copied inside the directory.") (set #stringE2 "") (set #stringF "\nCopying developer documentation...") (set #stringF1 "") (set #stringF2 "Docs") (set #stringF3 "CodingConventions.guide#?") ; Copy RoboticsDP drawer icon (set #stringF4 "\nCopying RoboticsDP icon...") (set #stringF5 "/") (set #stringF6 "RoboticsDP.info") ; Copy Docs drawer icon (set #stringF7 "\nCopying Docs icon...") (set #stringF8 "") (set #stringF9 "Docs.info") ; Copy autodocs (set #stringFA "\nCopying autodocs...") (set #stringFB "") (set #stringFC "Autodocs#?") ;----------------------------------------------------------------------------- ; Strings: Library's history installation ;----------------------------------------------------------------------------- (set #stringG "LIBRARY'S HISTORY INSTALLATION\nSelect directory for RoboticsDP package. Directory 'RoboticsDP' will be created if it does not exists.") (set #stringG1 "LIBRARY'S HISTORY INSTALLATION\n\nThis part will install the minissc history file. The 'RoboticDP' directory will be created in the selected target directory and history file will be copied inside the directory.") (set #stringG2 "") (set #stringH "\nCopying history file...") (set #stringH1 "") (set #stringH2 "Docs") (set #stringH3 "History#?") ; Copy RoboticsDP drawer icon (set #stringH4 "\nCopying RoboticsDP icon...") (set #stringH5 "/") (set #stringH6 "RoboticsDP.info") ; Copy Docs drawer icon (set #stringH7 "\nCopying Docs icon...") (set #stringH8 "") (set #stringH9 "Docs.info") ;----------------------------------------------------------------------------- ; Strings: Mini SSC II documentation installation ;----------------------------------------------------------------------------- (set #stringI "MINI SSC II DOCUMENTATION INSTALLATION\nSelect directory for RoboticsDP package. Directory 'RoboticsDP' will be created if it does not exists.") (set #stringI1 "MINI SSC II DOCUMENTATION INSTALLATION\n\nThis part will install the Mini SSC II documentation. The 'RoboticDP' directory will be created in the selected target directory and documentation will be copied inside the directory.") (set #stringI2 "") (set #stringJ "\nCopying Mini SSC II documentation...") (set #stringJ1 "") (set #stringJ2 "Docs") (set #stringJ3 "Mini SSC II#?") ; Copy RoboticsDP drawer icon (set #stringJ4 "\nCopying RoboticsDP icon...") (set #stringJ5 "/") (set #stringJ6 "RoboticsDP.info") ; Copy Docs drawer icon (set #stringJ7 "\nCopying Docs icon...") (set #stringJ8 "") (set #stringJ9 "Docs.info") ;----------------------------------------------------------------------------- ; SUBROUTINES SUBROUTINES SUBROUTINES SUBROUTINES SUBROUTINES SUBROUTINES SUB ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ; TITLE : p_DecodeVersion ; VERSION : 0.10 ; DATE : 30.08.1998 ; DESCRIPTION : Get version and revision from raw version number ; INPUT : #version - raw version number ; OUTPUT : #ver - version number ; #rev - revision number ;----------------------------------------------------------------------------- ; MODIFICATIONS: - ;----------------------------------------------------------------------------- (procedure p_DecodeVersion #version (set #ver (/ #version 65536)) (set #rev (- #version (* #ver 65536))) ) ;----------------------------------------------------------------------------- ; TITLE : p_EncodeVersion ; VERSION : 0.10 ; DATE : 30.08.1998 ; DESCRIPTION : Create raw version number from version and revision number ; INPUT : #ver - version number ; #rev - revision number ; OUTPUT : #version - raw version number ;----------------------------------------------------------------------------- ; MODIFICATIONS: - ;----------------------------------------------------------------------------- (procedure p_EncodeVersion #ver #rev (set #version (+ (* #ver 65536) #rev)) ) ;----------------------------------------------------------------------------- ; TITLE : p_GetDestination ; VERSION : 0.10 ; DATE : 30.08.1998 ; DESCRIPTION : Get destination directory ; INPUT : - ; OUTPUT : @default-dest ;----------------------------------------------------------------------------- ; MODIFICATIONS: - ;----------------------------------------------------------------------------- (procedure p_GetDestination #d1string #d2string #d3string (set @default-dest (askdir (prompt #d1string) (help #d2string) (default #d3string) (disk) ); askdir ) ); p_GetDestination ;----------------------------------------------------------------------------- ; TITLE : p_CopyFiles ; VERSION : 0.10 ; DATE : 30.08.1998 ; DESCRIPTION : Copy files ; INPUT : - ; OUTPUT : - ;----------------------------------------------------------------------------- ; MODIFICATIONS: - ;----------------------------------------------------------------------------- (procedure p_CopyFiles #c1string #c2string #c3string #c4string (copyfiles (prompt #c1string) (help #c2string) (source #c3string) (dest @default-dest) (pattern #c4string) (optional "force") ); copyfiles ); p_CopyFiles ;----------------------------------------------------------------------------- ; MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN ;----------------------------------------------------------------------------- ; Welcome message (welcome #string2) ; Check Installer version (p_EncodeVersion #installer_ver #installer_rev) (if (< @installer-version #version) ( (exit #string1 (quiet)) ) ); if ; Open new screen for installer (effect "center" "horizontal" $000000 $000000) ; Open background picture (showmedia "#coverpic" "Installer/Cover.iff" "center" "none" 0) ; Ask install options (set #installoptions (askoptions (prompt #string5) (help #string50) (choices #string51 #string52 #string53 #string54 #string55 #string56 #string57) (default %1111111) ); askoptions ) ; 0% done (complete 0) ; 1st option (#string51) - Library (if (in #installoptions 0) ( ; Get destination directory (p_GetDestination #string6 #string61 #string62) ; Copy files (p_CopyFiles #string7 #string71 #string72 #string73) ) ); if ; 14% done (complete 14) ; 2nd (#string52) - Examples (if (in #installoptions 1) ( ; Get destination directory (p_GetDestination #string8 #string81 #packagedir) (set #packagedir @default-dest) ; Remember directory ; Copy RoboticsDP drawer icon (p_CopyFiles #string9 #string94 #string95 #string96) ; Set correct target directory for Examples drawer (set @default-dest (cat @default-dest "RoboticsDP")) ; Copy files (p_CopyFiles #string9 #string91 #string92 #string93) ) ); if ; 28% done (complete 28) ; 3rd option (#string53) - Includes (if (in #installoptions 2) ( ; Get destination directory (p_GetDestination #stringA #stringA1 #stringA2) ; Copy files (p_CopyFiles #stringB #stringB1 #stringB2 #stringB3) ) ); if ; 42% done (complete 42) ; 4th option (#string54) - User docs (if (in #installoptions 3) ( ; Get destination directory (p_GetDestination #stringC #stringC1 #packagedir) (set #packagedir @default-dest) ; Remember directory ; Copy RoboticsDP drawer icon (p_CopyFiles #stringD #stringaD4 #stringD5 #stringD6) ; Set correct target directory for Docs drawer (set @default-dest (cat @default-dest "RoboticsDP")) ; Copy Docs drawer icon (p_CopyFiles #stringD #stringaD7 #stringD8 #stringD9) ; Set correct target directory for documents (set @default-dest (cat @default-dest "/Docs")) ; Copy files (p_CopyFiles #stringD #stringD1 #stringD2 #stringD3) ) ); if ; 56% done (complete 56) ; 5th option (#string55) - Developer docs (if (in #installoptions 4) ( ; Get destination directory (p_GetDestination #stringE #stringE1 #packagedir) (set #packagedir @default-dest) ; Remember directory ; Copy RoboticsDP drawer icon (p_CopyFiles #stringF #stringaF4 #stringF5 #stringF6) ; Set correct target directory for Docs drawer (set @default-dest (cat @default-dest "RoboticsDP")) ; Copy autodocs (p_CopyFiles #stringFA #stringF1 #stringFB #stringFC) ; Copy Docs drawer icon (p_CopyFiles #stringF #stringaF7 #stringF8 #stringF9) ; Set correct target directory for documents (set @default-dest (cat @default-dest "/Docs")) ; Copy docs (p_CopyFiles #stringF #stringF1 #stringF2 #stringF3) ) ); if ; 60% done (complete 60) ; 6th option (#string56) - Library's history (if (in #installoptions 5) ( ; Get destination directory (p_GetDestination #stringG #stringG1 #packagedir) (set #packagedir @default-dest) ; Remember directory ; Copy RoboticsDP drawer icon (p_CopyFiles #stringH #stringaH4 #stringH5 #stringH6) ; Set correct target directory for Docs drawer (set @default-dest (cat @default-dest "RoboticsDP")) ; Copy Docs drawer icon (p_CopyFiles #stringH #stringaH7 #stringH8 #stringH9) ; Set correct target directory for history directory (set @default-dest (cat @default-dest "/Docs")) ; Copy history directory (p_CopyFiles #stringH #stringH1 #stringH2 #stringH3) ) ); if ; 74% done (complete 74) ; 8th option (#string57) - Mini SSC II docs (if (in #installoptions 6) ( ; Get destination directory (p_GetDestination #stringI #stringI1 #packagedir) (set #packagedir @default-dest) ; Remember directory ; Copy RoboticsDP drawer icon (p_CopyFiles #stringJ #stringaJ4 #stringJ5 #stringJ6) ; Set correct target directory for Docs drawer (set @default-dest (cat @default-dest "RoboticsDP")) ; Copy Docs drawer icon (p_CopyFiles #stringJ #stringaJ7 #stringJ8 #stringJ9) ; Set correct target directory for history directory (set @default-dest (cat @default-dest "/Docs")) ; Copy Mini SSC II docs directory (p_CopyFiles #stringJ #stringJ1 #stringJ2 #stringJ3) ) ); if ; All done (complete 100) (exit #string3 (quiet))